package com.frame.demo.rest;

import java.util.Map;

/**
 * Created by LeiYu on 2015/6/12.
 */
public class ResponseProtocol<T> {
    protected boolean success;
    protected String msg;
    protected String stackTrace;
    protected int error_code;
    protected String resultString;
    protected int pageNumber;
    protected    int    pageSize;
    protected    int    pageCount;
    protected     int  recordCount;
    private T data;

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public void setError_code(int error_code) {
        this.error_code = error_code;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public boolean isSuccess() {
        return this.success;
    }

    public int getErrorCode() {
        return this.error_code;
    }

    public String getMsg() {
        return this.msg;
    }

    public String getUrl() {
        return null;
    }

    public Map<String, String> getParams() {
        return null;
    }

    public int getMethod() {
        return 0;
    }

    public String toString() {
        return "CODE[" + this.getErrorCode() + "] MSG[" + this.getMsg() + "]";
    }

    public String getResultString() {
        return this.resultString;
    }

    public void setResultString(String resultString) {
        this.resultString = resultString;
    }

    public String getStackTrace() {
        return this.stackTrace;
    }

    public void setStackTrace(String stackTrace) {
        this.stackTrace = stackTrace;
    }

    public int getError_code() {
        return error_code;
    }

    public int getPageNumber() {
        return pageNumber;
    }

    public void setPageNumber(int pageNumber) {
        this.pageNumber = pageNumber;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageCount() {
        return pageCount;
    }

    public void setPageCount(int pageCount) {
        this.pageCount = pageCount;
    }

    public int getRecordCount() {
        return recordCount;
    }

    public void setRecordCount(int recordCount) {
        this.recordCount = recordCount;
    }
}
